package chances.declare.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import chances.declare.entity.UnitContent;
import chances.declare.repo.UnitContentRepository;
import chances.declare.web.MergerModel;
import chances.declare.web.UnitContentCPContent;


/**
*@Author Guoyh
*@Date 2017年7月28日 下午5:07:11
*chances.declare.service
*归并实体类的处理层
*/
@Service
public class UnitContentService {
	@Autowired
	private UnitContentRepository unitContentRepository;
	
	public UnitContent search(Long id){
		return unitContentRepository.findOne(id);
	}
	
	public Page<UnitContentCPContent> getUnitContentCPContent(MergerModel model,Pageable pageable){
		return unitContentRepository.search(model, pageable);
	}
	
	public Page<UnitContentCPContent> adoptDeclareSearch(MergerModel model,Pageable pageable){
		return unitContentRepository.adoptDeclareSearch(model, pageable);
	}
	

	
}
